#ifndef CX_ENCODER_READ_H
#define CX_ENCODER_READ_H
#include "cx_list.h"

#define CX_ENCODER_READ_ATTR_TRIGGER_TYPE_MASK    0x00000001
#define CX_ENCODER_READ_ATTR_TRIGGER_TYPE_CONTINIOUS   0x00000000
#define CX_ENCODER_READ_ATTR_TRIGGER_TYPE_ONESHOT 0x00000001

typedef void (*cx_encoder_read_cb)(cx_uint32_t time,cx_pointer_t args);

typedef struct cx_encoder_read_event
{
    struct cx_slist_item *next;

    cx_encoder_read_cb func_cb;
    cx_pointer_t args;

    cx_uint32_t attr;
}cx_encoder_read_event_t;

cx_slist_t * cx_encoder_read_init(void);
cx_slist_item_t *cx_encoder_read_register(cx_encoder_read_event_t *event);
cx_slist_item_t * cx_encoder_read_delete(cx_encoder_read_event_t *event);
void cx_encoder_read_cb_handler(void);
#endif
